package cn.yearndr.zfsy.zfsy.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.ArrayList;

@Service
public class WeatherService {

//    @Autowired
//    HttpRequestService httpRequestService;

    @Autowired
    WeatherService weatherService;

    static String URLHEAD = "https://www.baidu.com/s?ie=utf-8";

    /**
     * 通过客户机真实ip获取地理信息比获得天气信息并返回
     * 考虑到要使用Nginx或其他反向代理的特殊情况，直接采用客户机传递ip方式，避免由于反向代理所造成的客户机ip非法
     * @param clientIP
     * @return
     */
    public ArrayList<ArrayList> getWeatherByIP(String clientIP) throws IOException {
        ArrayList<ArrayList> arrayList = GetWeather.getWeatherByIP(clientIP);
        return arrayList;
    }


}
